<?php
	require(dirname(__FILE__) . '/includes/init.php');
if(empty($_REQUEST['sn'])){
	header("Location: customerservice.php\n");
}else{
	$sql = "select * from ".$GLOBALS['ecs']->table('orders_action')." where order_id='".$_REQUEST['sn']."'";
	$records = $GLOBALS['db']->getAll($sql);
    foreach($records as $index=>$record){
		if($record['status']==1){
			$records[$index]['status']='解决中';
		}elseif($record['status']==2){
			$records[$index]['status']='已解决';
		}
		if($record['action_name']==0){
			$records[$index]['action_name']='未选择';
		}elseif($record['action_name']==1){
			$records[$index]['action_name']='退款';
		}elseif($record['action_name']==2){
			$records[$index]['action_name']='补发';
		}elseif($record['action_name']==3){
			$records[$index]['action_name']='其他';
		}
	}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 解决记录列表 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
 
<h1>
<span class="action-span"><a href="customerservice.php">回到售后列表</a></span>
<span class="action-span1"><a target="_top" href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 解决记录列表 </span>
<div style="clear:both"></div>
</h1>
  <div class="list-div" id="listDiv">
 
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>处理人</th>
	<th>状态</th>
	<th>解决方式</th>
	<th>处理时间</th>
	<th>跟进内容</th>
  <tr>
  <?php 
	if(count($records)>0){
	foreach($records AS $index => $record){
  ?>

   <tr>
    <td><?php echo $record['do_name']?></td>
    <td><?php echo $record['status']?></td>
	 <td><?php echo $record['action_name']?></td>
    <td><?php echo date('Y-m-d H:i:s',$record['action_time']);?></td>
    <td><?php echo $record['contents']?></td>
  <tr>
  <?php 
      } 
	}
  ?>
  </table>
 
<!-- 分页 -->
  </div>
</body>
</html>